file(GLOB_RECURSE TOOLS_FILES "${CMAKE_SOURCE_DIR}/src/tools/filecheck/*.*")
file(GLOB_RECURSE X_HASH_FILES "${CMAKE_CURRENT_LIST_DIR}/src/*.*")
set(PRO_FILES ${CMAKE_CURRENT_LIST_DIR}/xHash.rc)
list(APPEND PRO_FILES ${CMAKE_CURRENT_LIST_DIR}/xHash.qrc)
list(APPEND PRO_FILES ${X_COMMON_FILES})
list(APPEND PRO_FILES ${TOOLS_FILES})
list(APPEND PRO_FILES ${X_HASH_FILES})

include(cmake/x_qt_deploy.cmake)
include(cmake/x_qt_linguist.cmake)
include(cmake/x_3rd_glog.cmake)

# --------------------------------------------------------------------------------------------------
include_directories(${CMAKE_SOURCE_DIR}/xapps)
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${X_BINS_DIR}/xHash)
add_compile_definitions(X_NO_NETWORK)
qt_add_executable(xHash ${PRO_FILES})
x_deploy_qt(xHash)
x_using_x_tools_translations(xHash)
target_link_libraries(xHash PRIVATE Qt::CorePrivate Qt::Svg Qt::Widgets glog::glog)
if(X_USING_VS_CODE)
  set_target_properties(xHash PROPERTIES MACOSX_BUNDLE TRUE)
else()
  set_target_properties(xHash PROPERTIES MACOSX_BUNDLE TRUE WIN32_EXECUTABLE TRUE)
endif()

# --------------------------------------------------------------------------------------------------
if(WIN32)
  target_link_libraries(xHash PRIVATE Dwmapi)
elseif(LINUX)
  target_link_libraries(xHash PRIVATE dl)
endif()
